<% provide(:title, "Edit user") %>
<div class="home-page">
  <h1>修改你资料</h1>
  <div class="home-page">
    <div class="row">
      <div class="col-md-6 col-md-offset-3">
        <%= form_for(@user) do |f| %>
            <%= render 'shared/error_messages', object: f.object %>

            <%= f.label :name %>
            <%= f.text_field :name, class: 'form-control' %>

            <%= f.label :email %>
            <%= f.email_field :email, class: 'form-control' %>

            <%= f.label :password %>
            <%= f.password_field :password, class: 'form-control' %>

            <%= f.label :password_confirmation, "Confirmation" %>
            <%= f.password_field :password_confirmation, class: 'form-control' %>

            <%= f.submit "保存设置", class: "btn btn-primary" %>
        <% end %>
        <div class="gravatar_edit">
          <%= gravatar_for @user %>
          <a href="http://gravatar.com/emails" target="_blank">change</a>
        </div>
      </div>
    </div>
  </div>
</div>